Basic SetTimeout()


What's that?

SetTimeout works in a way that makes your browser display a message after a predefined amount of time. This is how it works!

				
STEP ONE
Leave A Message:
< p >Click the button! I left you a message that will activate in three seconds.< / p >

STEP TWO
Make The Button:
< button onclick="myFunction()" >click me perchance < / button >

STEP THREE
Activate The Script:
< script >
function myFunction() {
    setTimeout(function(){ alert("whaddup fool"); }, 3000);
} < / script >

				
			

 

Code in action!

View at full scale